<?php
/**
 * Created by PhpStorm.
 * User: guokunsheng
 * Date: 18/6/6
 * Time: 17:40
 */
namespace app\common\validate;

use think\Validate;

/**
 * 短信相关验证
 * Class Identify
 * @package app\common\validate
 */
class Identify extends Validate
{

    protected $rule = [
        'tel' => 'require|number|length:11|regex:^1[3456789]{1}\d{9}$',
    ];

    protected $message = [
        'tel.require' => '手机号不能为空',
        'tel.number' => '手机号错误',
        'tel.length' => '手机号错误',
        'tel.regex' => '手机号错误',
    ];
}